<template>
<div>
  <div class="top-line">
    <div style="text-align: right;padding-right: 30px">
    <a ><router-link to="/login">登录&nbsp</router-link></a>|<a href="">&nbsp注册</a>
    </div>
  </div>
  <div class="top-content">


    <div class="t-c-main">
      <ul>
        <li><router-link to="/index/fistPage">首页</router-link></li>
        <li><router-link to="/index/aboutUs">关于我们</router-link></li>
        <li><router-link to="/index/productShow">产品商城</router-link></li>
        <li><router-link to="/index/seller">经销商</router-link></li>
        <li><router-link to="/index/paper">媒体中心</router-link></li>
        <li><router-link to="/index/callUs">联系我们</router-link></li>
      </ul>
    </div>
  </div>

  <div class="main">
    <router-view/>
  </div>


  <div class="footer"></div>
</div>
</template>

<script>
export default {
  name: "index",
  data(){
    return{

    }
  },
  methods:{
    loadFistPage(){
      let path=this.$router.currentRoute.path;
      if(path==='/'){this.$router.push('/index/fistPage');}
    }

  },
  mounted() {
   this.loadFistPage();
  }

}
</script>

<style scoped>
.t-c-main>ul{
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.t-c-main{
  margin: 0 auto;
  height: 100%;
  width: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;

}
.top-line{

  width: 100%;
  height: 40px;
  background-color: #171411;
  line-height: 40px;
  color: #fff;
}
.top-line a{
  color: white;
  font-size: 13px;

}
.top-content{
  width: 100%;
  height: 150px;
  background-color: #F4D720;
  position: relative;
  display: block;
}

.footer{
  width: 100%;
  height: 50px;
  position: relative;
  background-color: #F9E98A;
}

</style>